package P1线性结构;

public class TestArrayDeque {
    public static void main(String[] args) {
        ArrayDeque<Integer> stack = new ArrayDeque<>();
        stack.push(1);
        stack.push(2);
        stack.push(3);
        System.out.println(stack);
        stack.pop();
        System.out.println(stack);
        ArrayDeque<Integer> queue = new ArrayDeque<>();
        for (int i = 1; i <= 6; i++) {
            queue.offer(i);
        }
        for (int i = 1; i <= 6; i++) {
            System.out.println(queue.poll());
        }
    }
}